﻿#ifndef DIRMANAGE_H
#define DIRMANAGE_H

#include <QWidget>
#include <QTableWidget>
#include "cadremanage/fileinfoedit.h"

namespace Ui {
class DirManage;
}

class DirManage : public QWidget
{
    Q_OBJECT

public:
    explicit DirManage(QWidget *parent = 0);
    ~DirManage();
    void initForm();
    void enableForm();
    void initTableWidget();
    void initTableWidget_ml(QTableWidget * tableWidget_ml);
    void SwapTwoRow(int selectRow, int targetRow);
    void showCadreFileData();
    void getTableWidget(int count);
    QString saveHtmlToPDF(QString fileName);

signals:
    void printSignal();
    void findCadre();
    void fileEdit();
    //void sendData(QString idNumPre,QString classNumPre,QString materialNamePre,
                  //QString creatTimePre,int pageNumPre,int copyNumPre,QString descriptionPre);

private slots:
    void lockEdit();

    void sendPrintSlot();

    void on_buttonAdd_clicked();

    void on_buttonDel_clicked();

    void on_buttonUp_clicked();

    void on_buttonDown_clicked();

    void on_buttonFind_clicked();

    void on_listWidget_currentRowChanged(int currentRow);

    void on_buttonInOut_clicked();

    void on_buttonEdit_clicked();

    void on_buttonRefresh_clicked();

    void on_buttonPrint_clicked();

    void on_tableWidget_da_itemSelectionChanged();

    void on_buttonInsert_clicked();

    //void PrepareForEdit(int widCount);

private:
    Ui::DirManage *ui;
    QTableWidget *tableWidget;
//    QString idNumPre;
//    QString classNumPre;
//    QString orderNumPre;
//    QString materialNamePre;
//    QString creatTimePre;
//    int pageNumPre;
//    int copyNumPre;
//    QString descriptionPre;
//    static int dirIDPre;

};

#endif // DIRMANAGE_H
